Optimal. Leaf size=67 \[ \frac {3 a x}{8}-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3567, 2715, 8}
\begin {gather*} -\frac {i a \cos ^4(c+d x)}{4 d}+\frac {a \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 a x}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 3567
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac {i a \cos ^4(c+d x)}{4 d}+a \int \cos ^4(c+d x) \, dx\\ &=-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} (3 a) \int \cos ^2(c+d x) \, dx\\ &=-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{8} (3 a) \int 1 \, dx\\ &=\frac {3 a x}{8}-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 46, normalized size = 0.69 \begin {gather*} \frac {a \left (12 c+12 d x-8 i \cos ^4(c+d x)+8 \sin (2 (c+d x))+\sin (4 (c+d x))\right )}{32 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 53, normalized size = 0.79
method | result | size |
derivativedivides | \(\frac {-\frac {i a \left (\cos ^{4}\left (d x +c \right )\right )}{4}+a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(53\) |
default | \(\frac {-\frac {i a \left (\cos ^{4}\left (d x +c \right )\right )}{4}+a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(53\) |
risch | \(\frac {3 a x}{8}-\frac {i a \,{\mathrm e}^{4 i \left (d x +c \right )}}{32 d}-\frac {i a \cos \left (2 d x +2 c \right )}{8 d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 61, normalized size = 0.91 \begin {gather*} \frac {3 \, {\left (d x + c\right )} a + \frac {3 \, a \tan \left (d x + c\right )^{3} + 5 \, a \tan \left (d x + c\right ) - 2 i \, a}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 56, normalized size = 0.84 \begin {gather*} \frac {{\left (12 \, a d x e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a e^{\left (6 i \, d x + 6 i \, c\right )} - 6 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 136, normalized size = 2.03 \begin {gather*} \frac {3 a x}{8} + \begin {cases} \frac {\left (- 256 i a d^{2} e^{6 i c} e^{4 i d x} - 1536 i a d^{2} e^{4 i c} e^{2 i d x} + 512 i a d^{2} e^{- 2 i d x}\right ) e^{- 2 i c}}{8192 d^{3}} & \text {for}\: d^{3} e^{2 i c} \neq 0 \\x \left (- \frac {3 a}{8} + \frac {\left (a e^{6 i c} + 3 a e^{4 i c} + 3 a e^{2 i c} + a\right ) e^{- 2 i c}}{8}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 103, normalized size = 1.54 \begin {gather*} \frac {{\left (12 \, a d x e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - i \, a e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x\right )} + e^{\left (-2 i \, c\right )}\right ) - i \, a e^{\left (6 i \, d x + 6 i \, c\right )} - 6 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.34, size = 64, normalized size = 0.96 \begin {gather*} \frac {3\,a\,x}{8}+\frac {\frac {3\,a\,{\mathrm {tan}\left (c+d\,x\right )}^2}{8}+\frac {3{}\mathrm {i}\,a\,\mathrm {tan}\left (c+d\,x\right )}{8}+\frac {a}{4}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}+\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________